// Parameterized constructors, also uses pointers

# include <iostream>
using namespace std;

class Student {
  char *name[30], *sex[6];
  int rollNo, age;
public:
  Student (char nm[10], char sx[6], int rn, int ag);
  void display();
};

Student::Student (char nm[10], char sx[6], int rn, int ag) {
  *name = nm;
  *sex =  sx;
  rollNo = rn;
  age = ag;
}

void Student::display() {
  cout << "Name: " << *name << endl;
  cout << "Roll No: " << rollNo << endl;
  cout << "Sex: " << *sex << endl;
  cout << "Age: " << age << endl;
}

int main() {
  char nm[30], sx[6];
  int rn, ag;
  cout << "Enter name: ";
  cin >> nm;
  cout << "Enter sex: ";
  cin >> sx;
  cout << "Enter roll number: ";
  cin >> rn;
  cout << "Enter age: ";
  cin >> ag;
  Student stud(nm, sx, rn, ag);
  stud.display();
}
